import request from './request.js'

const key = 'c14627c952c925e30cde281f04ef823d'

//通过城市名查询 adcode
export const getCityAdcode = (value) => {
  return request({
    method: 'GET',
    url: `/geocode/geo?address=${value}&key=${key}&batch=false`,
  })
}

// 获取访问者IP并查询所在城市
export const getCityByIp = () => {
  return request({
    method: 'GET',
    url: `/ip?key=${key}`,
  })
}
